3.4.39 \(\int \frac {\log (\frac {a (1-c)+b (1+c) x}{a+b x})}{a^2-b^2 x^2} \, dx\) [339]

Optimal. Leaf size=37 \[ \frac {\text {Li}_2\left (1-\frac {a (1-c)+b (1+c) x}{a+b x}\right )}{2 a b} \]

[Out]

1/2*polylog(2,1+(-a*(1-c)-b*(1+c)*x)/(b*x+a))/a/b

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.026, Rules used = {2497} \begin {gather*} \frac {\text {PolyLog}\left (2,1-\frac {a (1-c)+b (c+1) x}{a+b x}\right )}{2 a b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[(a*(1 - c) + b*(1 + c)*x)/(a + b*x)]/(a^2 - b^2*x^2),x]

[Out]

PolyLog[2, 1 - (a*(1 - c) + b*(1 + c)*x)/(a + b*x)]/(2*a*b)

Rule 2497

Int[Log[u_]*(Pq_)^(m_.), x_Symbol] :> With[{C = FullSimplify[Pq^m*((1 - u)/D[u, x])]}, Simp[C*PolyLog[2, 1 - u
], x] /; FreeQ[C, x]] /; IntegerQ[m] && PolyQ[Pq, x] && RationalFunctionQ[u, x] && LeQ[RationalFunctionExponen
ts[u, x][[2]], Expon[Pq, x]]

Rubi steps

\begin {align*} \int \frac {\log \left (\frac {a (1-c)+b (1+c) x}{a+b x}\right )}{a^2-b^2 x^2} \, dx &=\frac {\text {Li}_2\left (1-\frac {a (1-c)+b (1+c) x}{a+b x}\right )}{2 a b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(252\) vs. \(2(37)=74\).
time = 0.13, size = 252, normalized size = 6.81 \begin {gather*} \frac {\log ^2\left (\frac {2 a c}{(1+c) (a+b x)}\right )-2 \log (a-b x) \log \left (\frac {a+b x}{2 a}\right )+2 \log (a-b x) \log \left (\frac {a-a c+b (1+c) x}{2 a}\right )+2 \log \left (\frac {2 a c}{(1+c) (a+b x)}\right ) \log \left (-\frac {a-a c+b (1+c) x}{2 a c}\right )-2 \log (a-b x) \log \left (\frac {a-a c+b (1+c) x}{a+b x}\right )-2 \log \left (\frac {2 a c}{(1+c) (a+b x)}\right ) \log \left (\frac {a-a c+b (1+c) x}{a+b x}\right )-2 \text {Li}_2\left (\frac {a-b x}{2 a}\right )+2 \text {Li}_2\left (\frac {(1+c) (a-b x)}{2 a}\right )-2 \text {Li}_2\left (\frac {(1+c) (a+b x)}{2 a c}\right )}{4 a b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[(a*(1 - c) + b*(1 + c)*x)/(a + b*x)]/(a^2 - b^2*x^2),x]

[Out]

(Log[(2*a*c)/((1 + c)*(a + b*x))]^2 - 2*Log[a - b*x]*Log[(a + b*x)/(2*a)] + 2*Log[a - b*x]*Log[(a - a*c + b*(1
 + c)*x)/(2*a)] + 2*Log[(2*a*c)/((1 + c)*(a + b*x))]*Log[-1/2*(a - a*c + b*(1 + c)*x)/(a*c)] - 2*Log[a - b*x]*
Log[(a - a*c + b*(1 + c)*x)/(a + b*x)] - 2*Log[(2*a*c)/((1 + c)*(a + b*x))]*Log[(a - a*c + b*(1 + c)*x)/(a + b
*x)] - 2*PolyLog[2, (a - b*x)/(2*a)] + 2*PolyLog[2, ((1 + c)*(a - b*x))/(2*a)] - 2*PolyLog[2, ((1 + c)*(a + b*
x))/(2*a*c)])/(4*a*b)

________________________________________________________________________________________

Maple [A]
time = 0.78, size = 24, normalized size = 0.65

method result size
derivativedivides \(\frac {\dilog \left (1+c -\frac {2 c a}{b x +a}\right )}{2 b a}\) \(24\)
default \(\frac {\dilog \left (1+c -\frac {2 c a}{b x +a}\right )}{2 b a}\) \(24\)
risch \(\frac {\dilog \left (1+c -\frac {2 c a}{b x +a}\right )}{2 b a}\) \(24\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln((a*(1-c)+b*(1+c)*x)/(b*x+a))/(-b^2*x^2+a^2),x,method=_RETURNVERBOSE)

[Out]

1/2/b/a*dilog(1+c-2*c*a/(b*x+a))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 246 vs. \(2 (33) = 66\).
time = 0.31, size = 246, normalized size = 6.65 \begin {gather*} \frac {1}{2} \, {\left (\frac {\log \left (b x + a\right )}{a b} - \frac {\log \left (b x - a\right )}{a b}\right )} \log \left (\frac {b {\left (c + 1\right )} x - a {\left (c - 1\right )}}{b x + a}\right ) + \frac {\log \left (b x + a\right )^{2} - 2 \, \log \left (b x + a\right ) \log \left (b x - a\right )}{4 \, a b} + \frac {\log \left (b x - a\right ) \log \left (\frac {b {\left (c + 1\right )} x - a {\left (c + 1\right )}}{2 \, a} + 1\right ) + {\rm Li}_2\left (-\frac {b {\left (c + 1\right )} x - a {\left (c + 1\right )}}{2 \, a}\right )}{2 \, a b} + \frac {\log \left (b x + a\right ) \log \left (-\frac {b x + a}{2 \, a} + 1\right ) + {\rm Li}_2\left (\frac {b x + a}{2 \, a}\right )}{2 \, a b} - \frac {\log \left (b x + a\right ) \log \left (-\frac {b {\left (c + 1\right )} x + a {\left (c + 1\right )}}{2 \, a c} + 1\right ) + {\rm Li}_2\left (\frac {b {\left (c + 1\right )} x + a {\left (c + 1\right )}}{2 \, a c}\right )}{2 \, a b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((a*(1-c)+b*(1+c)*x)/(b*x+a))/(-b^2*x^2+a^2),x, algorithm="maxima")

[Out]

1/2*(log(b*x + a)/(a*b) - log(b*x - a)/(a*b))*log((b*(c + 1)*x - a*(c - 1))/(b*x + a)) + 1/4*(log(b*x + a)^2 -
 2*log(b*x + a)*log(b*x - a))/(a*b) + 1/2*(log(b*x - a)*log(1/2*(b*(c + 1)*x - a*(c + 1))/a + 1) + dilog(-1/2*
(b*(c + 1)*x - a*(c + 1))/a))/(a*b) + 1/2*(log(b*x + a)*log(-1/2*(b*x + a)/a + 1) + dilog(1/2*(b*x + a)/a))/(a
*b) - 1/2*(log(b*x + a)*log(-1/2*(b*(c + 1)*x + a*(c + 1))/(a*c) + 1) + dilog(1/2*(b*(c + 1)*x + a*(c + 1))/(a
*c)))/(a*b)

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 34, normalized size = 0.92 \begin {gather*} \frac {{\rm Li}_2\left (\frac {a c - {\left (b c + b\right )} x - a}{b x + a} + 1\right )}{2 \, a b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((a*(1-c)+b*(1+c)*x)/(b*x+a))/(-b^2*x^2+a^2),x, algorithm="fricas")

[Out]

1/2*dilog((a*c - (b*c + b)*x - a)/(b*x + a) + 1)/(a*b)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln((a*(1-c)+b*(c+1)*x)/(b*x+a))/(-b**2*x**2+a**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log((a*(1-c)+b*(1+c)*x)/(b*x+a))/(-b^2*x^2+a^2),x, algorithm="giac")

[Out]

integrate(-log((b*(c + 1)*x - a*(c - 1))/(b*x + a))/(b^2*x^2 - a^2), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \frac {\ln \left (-\frac {a\,\left (c-1\right )-b\,x\,\left (c+1\right )}{a+b\,x}\right )}{a^2-b^2\,x^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(-(a*(c - 1) - b*x*(c + 1))/(a + b*x))/(a^2 - b^2*x^2),x)

[Out]

int(log(-(a*(c - 1) - b*x*(c + 1))/(a + b*x))/(a^2 - b^2*x^2), x)

________________________________________________________________________________________